package com.ruoyi.shop.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单细节管理对象 order_detail
 *
 * @author ruoyi
 * @date 2022-04-08
 */
public class OrderDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 订单细节id
     */
    private Long id;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long goodsId;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private Long orderId;

    /**
     * 状态   0-未评价  1-一评价
     */
    @Excel(name = "状态   0-未评价  1-一评价")
    private Integer status;

    /**
     * 数量
     */
    @Excel(name = "数量")
    private Integer num;

    /**
     * 总价
     */
    @Excel(name = "总价")
    private Double total;

    /**
     * 收货地址
     */
    private Address address;

    /**
     * 订单
     */
    private Order order;

    private Goods goods;

    private Long shopId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getNum() {
        return num;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public Double getTotal() {
        return total;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public Goods getGoods() {
        return goods;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("goodsId", getGoodsId())
                .append("orderId", getOrderId())
                .append("status", getStatus())
                .append("num", getNum())
                .append("total", getTotal())
                .append("address", getAddress())
                .toString();
    }
}
